Fix logical expressions unwrapping

TODO: ifs and whiles (and repeat untils!)