Added case insensitivity to match patterns