Calculate_badwidth fixes

This and the bigger timeout should allow the threads to finish.