hacks to get subtyping working