Added handling of victory.