Fix test type errors