Better examples and more useful error output.
Fixes bug in error reporting.