fix bugs: incorrect use of vector