bugid-47810 remove foreach