Very stupid error with vector fixed

Reallocating the vector elements now works fine.