Added callback afterClose in the-box