removed commented out gunk. fixed printing null on loss of connection