better error message. fix typo