fixed NOR bug