Correct error on removing last heap item