close monitor refined
prevent hang when shutting down