fix string replication bug