fixed npe in builder constructor