fixing error when removing shelves