fix strncopy/strncat index