fixed startup and shutdown for domains