Fix bug in path formations

Change-Id: I8786e8dc26bed733039f1f8eae9aa4f11b8d6f43
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>