some fixes for case insensitivity