fix error judge in the backend