fixed bugs in builder