Fix issue #237

This PR attempts to fix the problem with operator_to_vector and vector_to_operator that was reported in #237
Thanks, good point. It seems to work like you suggest: PR #242