fix some bug for client