get package names right in all cases