Fix for a error being thrown when there is no error