fix client bugs