Some bug fixes and changes to the error strings.