refactored Object::setProperty to fix #49