Correcting error types - fixes #57