Fixed some stuff for type variable.