Corrected the automated quote function