Fix for running multiple instances of main.py