Fix/vector optim