Adding bidirectional condition check for if and some var adjustments