fixed client constructor