fixed type error in vector code