Minor logic improvement.