fixed a bug in vector