Fix issue #237

This PR attempts to fix the problem with operator_to_vector and vector_to_operator that was reported in #237