Correcting bugs for year 2009 and debugging check_consistency