I've fixed the type signatures.