Fix corner-case casing issue
Finish #516