fix for save states