Fix bug when creating or updating a temporary sld and fix statistics histogram process.