fixed issue when removing slides and saving.