Welcome to the Newschoolers forums! You may read the forums as a guest, however you must be a registered member to post. Register to become a member today!
So it sounds like you slid out, believe me that happens to EVERYONE no matter how good you are. What you should do is approch the rail from whatevr side you want and almost step-hop onto the rail. Like left your inside foot up a bit before hopping off your outside foot and then turn 90. This is all done really quickly though so dont overexaggerate it. It may sound funny but practicing on a stair or something can help you get the feeling of popping onto the rail.
As you land on the rail keep your legs shoulder width apart and slightly bend your knees with your weight centered and watch the end of the rail and get prepared to get off.
It is actually easier than it sounds so just practice and you will get it soon! Good Luck!