WELD-1595 Fix potential security leaks