Fix some bugs about type initializer.