fixing an issue that would cause different output in -a mode depending on random seed