fixed client bugs