Correctly escape single quotes