Corrected the priority queue program