fix a bug introduced when removing extra data