Bug fix in bc routine