fix data conversions