Better cleanup in X11 destruction