Fix file editing bug