My buddies and I have this thing called the 'chair' which means you imagine yourself sitting in a chair straight while crouching. This makes sure your body is directly above your board. Your heelflips should stay under you and not go behind you if you do that.
It's already been said, but to add to it, if you lean forward too much while crouching your board is going to go behind you. Your head shouldn't be leaning over the board, your body should be perfectly straight. Watch as you start landing heelflips every try. Seriously, that's the biggest mistake people do with that trick, and actually many other tricks.