Fixed file save "modified outside" bug