Added the lag free autosave from the v1.7.2 branch (adapted to 1.7.9 ofcourse)