Fixed motion bug (and potential multi threading issue)