fix bug on baremetal.py