General commit: bug fixes