restore update_summary code
and fix bug in unplanned work logging