fix some conversion issues