After you pop, align your shoulders mid-air so that they're parallel with the ledge. Coming in at a little less of an angle will probably help too.
This trick is hard for me because I have trouble evening out my board so both trucks get on,I always end up with my back truck locked in and my front truck rolling on the ledge not locked in. I roll up to the ledge at about a 30 degree angle and I ride about 6 inches from the ledge
^ This is good advice. When I do my front 50's I almost run completely parallel with the ledge/rail before I pop, and don't really shift my board over on top until I'm already in the air. It's like if you're standing still, not moving, and you ollie and just try to shift your board left/right about a foot or so while you're in the air.
I've also found on 5050's that it can help to get the front truck locked on SLIGHTLY before the back one. It's hard to explain but you can shift your weight a bit while you're in the air and let the front truck contact/lock first, so the back one follows suit. Don't make it a huge exaggerated front first/back last, but just a quick click on the front before the rear follows up.
ATM 8.0
Krux Standard Forged
Spitfire F4 101a 52mm
Bronson G3s
Next time you try this trick, I don't know if you tried this already but practice it stationary. Stand kinda close to the ledge and just practice ollieing onto it and locking the trucks on. Seriously if you put some time into trying this stationary thing you'll get it no problem while rolling.
Practicing 50-50 stalls really help. Practive positioning and landing on a curb until you are confident to pull one on a rail or waxed curb. Start out small and work your way up.
I can't do frontside 50's cause I can't ollie onto something behind me but I can somehow kickflip into it?