Fix crash opening new file.