Make gl selection more robust for testing