Fix save state creation. (Issue #791, bug introduced in 4b42c2ad453edb417d39ec8da076af1c742e6315)