fix strlen check