fixed messages and error reporting