Add resource id to event handler