physics changes and bug fixes