implemented and fixed some bug in domain deletion