Better shutdow procedure