fixing bug where case for quotations worked but not for apostrophe when extracting first template line