All known bug fixed: the algorithm now seems to work well!