Steak n Shake swings to 3Q profit