Fix progressbar for reinit

Since reinit including two states terminating/building the current machinestatemodal was not designed that, so this patch fixes issues related to reinit process