minor logic fix.