minor vector code tweaks