fix svg problem and add browser detection