minor fixes in build_framework.py

Please don't introduce unnecessary or big changes, because this file is under refactoring: #3292 #3294