- added some additional connection handeling