Update build_component.py

fix issue#7 and #8