Added comment and tweak to logic.