Fixed random crash on startup caused by lack of thread safety when using XLib