updated so that processing complete is correctly reported