*fixed* deadlock occured when sending a command in an event listener (closes #8)