Its hard to tell for sure what problems your running into, but normaly the problem is something like this:
_ySpeed is like 20, and the character is 10 px above the ground.
he moves down 20 px, so now he is hitting the ground (which im guessing tirggers an event, to stop gravity from working and set his _ySpeed to 0.
The problem though, is this stops the character from falling, but the character is 10 px into the ground already. so what youw ant to do is something like.
if(hitTest){
_ySpeed = 0.
//stop gravity
char.y = top of the ground.y
}
obviously not real code, but should give you the idea
Hope this helps