error when removing the last attribute