Made 'getUniquePath' synchronized.