Fix type and add test to prevent future typos