Fix tree null dereferences. Maybe.