fixed a bug on reading clients