bugfix throwing exception