Try to reproduce #142; fix a minor problem with error reporting