fixed a string slice issue