Raises correct exception
Bugfix