fixed an undefined error in type system