Fixed path expansion bug