Fixed one case of wrong error indication