Fixed an obscure JS bug with miles