Correctly supports objects of type Error. Closes #4