fix bad conversions