Fixed Bug with nil connection