Fixed rgl checking