Added handling of tie.