Bugfix in raised exception