fixed bug where package_definition was being overwritten