fix bug in unplanned work logging