last minor logic tweak was wrong