Bug fixes in test_deal.py, deal.py