fixed fiming of allocs in bfs