Fix if condition