fixing handling of quotes