Fixed bug introduced when fixing compiler warnings that broke utf8 support