Fix a pair of use after free. Should bring the bots back.