fix, when to exit, send a bye bye msg