Added an onexpand event check for storing the current publictaion in use