minor fixes to new quote function