[ALLI-2920] If-clause fix