Fix package name detection.