Small tidy up and fixed potential disconnect bug