Code added to prevent movement bugs.