Fixed bug in prependPath()