Bugfixes to create a package