fixed bug in handling quotes