fixed lifecycle of RenameFileDialog