Fix bug where some commands to controller result in incorrect/multiple commands sent to nodes