Fixed bug, using wrong exception class.