Make compatible with the latest RGL