Fixing invalid characters