minor logic tweak