Fixed typo in error thrown