fixed first client can not connect (null pointer)