Fixing pelican find root function