bug in validate_state & outcome of do_stats.py