fix exception handling (issue #8)