Fixed error when user closed the open file dialog