fix #1 resolving ties working