Update some bugs about typeclass resolution