Bugfix. Can resolve ties now.