fixed tests for errors