Fix Vec implementation bugs