Added 'tie' condition