On the front-tracking algorithm