Develop

Fix bugs in error reporting.