Fixed wrong call to top() insead extract() of SplPriorityQueue