Fixed crash on file editing