This used to regurly happen to me. however it not a big problem basically your mind is not used to consciously dreaming environment the key is not to focus on a particular thing this explaines why dream spinning and rubbing your hand make you wake up. the best thing you can do just be conscious of environment and let thing stabillize not panick your way with techinque that will not work for you. the technique you should try is not to think whilst going to sleep but try to imagine a object like a rose in front of you and then try and give that rose a sound then smell e.t.c. and then when your dreaming it will not freak you out of the dream.