Fix typo of method name in error message.

It's a small change, but it had me scratching my head for a minute.