FIX: Fix of tree fitting script