Fix get machine resource from tree