Fixing warnings and another attempt to fix X11 graphics