Formatting for #2134
Remove existing items only before the foreach. Now I feel so stupid for not seeing this error. CLoses #2134