Fix some broken logic