Fix for issue #503 "toSerializedObject3D crash and possible fix"