Fixed "gravity glitch" by adding missing lines to the constructor.