Problem while saving objects