Added two missing returns.
Fixed some typos in error msgs.