Two fixes related to X11