fix type error bug