Fix bug in main.py.