Handle context listener