#215: Redesigned path calculation to make sure it will not be wrong.
#215: fix conflict with 0deb989c53b69bc8b07c118d01705ff098ce5613