Added test for errors