Fixed optionalBlock state restoration