Fix package_name referenced before being assigned