It works in that light will travel faster in a less dense medium. Remove the relatively denser glass for gas/vacuum.
Also the way fibre works is commonly misunderstood. The light isn't bouncing.