Fix undefined variable messing up non-event tabs