fixed negative pattern matching