fix case-insensitivity bug