Bugfixes for remote state machines