Fix security problems