fixing uninit var and some style in runBFS