Malformed strings detection/fix implemented