Fixed oldpackages function