vector not called from right spot