fix bug where reducer would skip the last run