Fix main.py Connection creation