Add the period parameter to the callbacks and check it before update the UI.