Bugix: Terminating the string copy at the correct place.