fixed some ++s
fixed type error