added code to fix the error being recived earlier