The first step in fixing a broken program is getting it to fail repeatably [on the simplest example possible].