Fixed csp_next bug with domains larger than 2