Fix remote tests

Will probably need a rebase when #623 is merged.