Fixed autosave bug

Fixed a bug where new lines would disappear after an autosave.