Fixed deletemax for one element