utf8 import and other fixes