Fix typo in exception thrown