Bugfix: some exceptions were created but never raised.