fix the error path