Move utf convertion to the right place, tested and works