Update connectionlib.py

Fixed the mistakes on the base.