Added an error message, corrected a few typos.