Fixed bug with exception.