Reordered method calls to ensure proper activity logging