Throw GLException and bugfix