Fixed bugs with creating objects and getting objects.