Update the listener function.