Fixed tests to handle error reporting better