adding missed condition for ties