fix the check added in the previous commit