Fix metrics tree expansion