fixed a bug in the function checkForTie