Support for case insensitivity, NPE fix