Fixed wrong order of statements in main.py.