Fixed Package class instantiation in from_dict and from_obj