general updates and bug fixes