Add new tests. Fix if definition