added test for error