bug fix for tie