Corrected bug in element removal for the special case