Fix if-condition