fix error messages and such
various fixes