Remove automatic elements when removing last element