Fixed fatal error during restore