correction of if expression