Working out connection bugs