Fixed an ancient pervisitmax bug