$real_package should be $package when specified

default condition is in the wrong place