type coercion improvements