cleaned up svg detect