Fixing some broken logic.