Replaced CTor excpection with replacement of invalid chars.