Make the logic a lot clearer and fix the comment to match.