Fixed bugs in bard.py