Fix remote test helper
Fix type constraints