updated secure rewrites issue