Bug fixes and package change