added handling for remove on empty heap