Fix typeclasses