fix bug in build-all