fixed crash when taking a path that didnt return anything