Fixing a bug in the way data is stored in vec