Fixing the reversed logic for local/remote behaviour.