Fix nested ast nodes