Fixed crash when opening first new file