fix strlen bugs.