Fixed some issues related to autosave.

Signed-off-by: Kristian Duske <kristian.duske@gmail.com>