Fix double escaping and missing library after merge of #1056