Fix duplicate function in X11