Fixed issue with error being raised