fixed null client bug