Fix if snippet