Fix type error preventing cookies from working at all