Small security fixes