fixed string copy bug