copy changes and bug fixes