Fix file open and save bug.