fixing base conversions