fix an strncpy bug