Fix issue with test and issue with escaping single quotes when single quotes were needed.