Tweaked logic.