fix bug in func BC()