Fixed bug with result types in VectorOperator

If the result of the operator contains only one element and the argument
itself was a number, the result should become a number as well instead
of a vector with one element. Otherwise the original result is returned.

Also fixed #3