Fix for certain vector functions

Doesn't anyone check that stuff actually works before committing?