Fix #4: XCloseDisplay called to often
Fix #4: Missing XCloseDisplay