fixing file dialog bug