fixed the "foreach" problem in fakeServer