Fixed typos in error reporting code