Fixed the ugly 0 construct in connection.py