saving state problem fixed