Reference fix

Foreach loop in SCS code didn't work in newer PHP