fix the bug of type