Fix #9 (multiple optimal solutions).
Fix some signed/unsigned warnings.
Merge pull request #10 from bchretien/master

Fix check when multiple optimal solutions exist