various fixes due to unicode issues