fix some conversion errors