misc fixes for Xorg and compile