bugfix: exception handling