Fix ErrWrongType problem