Fix package handling further