fix the bug of type system