fix up condition logic a bit