toggle gl errors with a var