fix bugs of types