PAHMA-914: double quotes now handled. improved error checking.