fixed capitalization logic