add ir detect to avoid blocks