rename command to cmd
flush left callbacks when closing a connection