minor type system improvements