Added callback to close method