Quick sand static bodies

I'm getting a really weird problem where static bodies become non solid and my character body gets stuck in them like quick sand.

It's happening on some of my platform bodies, which is weird because they are all defined exactly the same except for their individual sets of vertices.

Heres an example of my problem showing the two situations (my character is the inner ball)

Image

On the left the ball slowly sinks into the box, on the right the ball rests on top.

Has anyone else experienced this problem? what might be wrong?
Are the vertices for the polygons given in counter-clockwise order?
You might need to give some code to show how you make the situation on the left.
Code:
platform.vertices[0] = new b2Vec2(0, 0);
platform.vertices[1] = new b2Vec2(mouseXScreen - startX, 0);
platform.vertices[2] = new b2Vec2(mouseXScreen - startX, mouseYScreen - startY);
platform.vertices[3] = new b2Vec2(0, mouseYScreen - startY);


the platforms are created with click&drag in my level editor. Does the order which the vertices are created matter?

EDIT:
I did some testing and it seems the platforms do only work when I click drag in a way that creates the vertices clockwise. guess I just need to code something now to make sure the vertices are in the right order. Thanks for the help!

Original thread: https://box2d.org/forum/viewtopic.php?t=7915