fix the winner logic