Fix to isError method as error can sometimes be set and 0.