Add XCloseDisplay() to close the X server connection