Fixed issue with exception