bugfix for clearing glGetError closes #1515