it's flush() that was causing the problem... (as far as i looked at the codes, and i confirmed it was flush(). )
i dont know much about it but something must be working strange with flush() or working differently than in other servers.
anyway, i wish you find solution soon.
