Fixed comparison function in heap