Fixed client bugs