fix a number of implicit conversions