Remove unnecessary foreach key