Fix unsafe firstObject.