Fix template events to allow ajax addons working.