Fixed exception handling per issue #28