fixed null termination of string for strlen