Grinding problem & 360 unispin problem

I have recently been going to the skatepark and grinding the slanted ledge rails. I’m having this problem where I jump into the rail, I grind, but only for a little before my unicycle/pedal offturns off the rail and I ride out of it. I want to grind it full but the unicycle keeps kinda turning off the rail. I want to be able to grind it full.

I think it could be from fear that I will fall of the other side of the ledge so I lean to the opposite side I’m grinding on. So what advice do you have to give on this?

I’m up to the stage where I’m trying to land it but not succeeding, I think the problem is I’m landing on the crank with one foot weirdly and the other one doesn’t do much.
Maybe it could be something with my spin, I’m not sure but I can’t land them properly, and advice?
Thanks, Brandon.