Some additions to debug function, crashes when ever someone disconnects, I shall deal with it later.