Clean ref kwarg from URL