utf8 bug fix - removed some casing functions calls that break utf8 encoding