Fixed a problem happened due to undefined variable 'pathElement' in the
root path.