duplicate fix from func tree over here