fixes some conversion issues