Fixing elev/dist mixup.