fix string copying error