added side collision, top collision isn't working

when player hits the top of a block they stay there, as if in quick sand