Fixed possible NullReferenceException in complex async methods in release mode