Problem with collision in tiled map

Hi !

I train to code with a 2D plateformer game, but I’ve a problem with a collision bug that I can not solve for several hours

When I walk in the ground, no problem, but when I go right or left while I’m jumping, the charac can cross box with collision and stay at the height of when he hit the box…

pastebin of my collision detection :

http://pastebin.com/K9b7vGbx

What’s wrong with this, please?

Thanks, and sorry for my English :stuck_out_tongue: