added OnDetach() client callback