fixed multivalued issue and added support for casting multivalued properties