ensure a callback is called after partial page replace