Fix security leak in profile