instead of wrapping your right leg in front of your left leg wrap it around the back of the pole, like you do when you stand on the pole only upside down!
That's backwards - her right leg needs to be in front of the pole, left leg behind it. Your outside leg is always on the front side of the pole; so if she inverted on the other side, you would be right, Meleania.
When you invert, just take it slow (make sure you do all the things Rouge said) and hook that outside leg up and over first, then bring the other leg up behind the pole. Nice, slow, controlled - gives you time to think about what your legs are doing. If you can't do it slow and controlled, it means you're not strong enough to be holding yourself up there yet.
Another good idea, which is something I did, is to lay with your back on the floor and practice the leg position. Pull your legs up the pole as far as you can and grip like you would if you were hanging there so you can learn exactly how to grip with your knees. If you do it enough, it will begin to feel natural and when you do it up on the pole you won't have to think about it.