Untangled some ifs