bug fix when removing columns