Fix potential security leak