tolerance changes and bug fixes