fixes bug that deletes the delete icon when the window is resized