Fixed bug causing brain_test to sometimes never finish>