Fix issues with unescaping