Fix #9 (multiple optimal solutions).