Fix Invalid argument supplied for foreach()