fix check for deferred state