fix bug about type