Fixes security issues on object returned by callPhantom