fix a type bug