Fix if block