fix #15 wgl and glx error handling (might still not work for glx)