Added a way to refresh state after a process returns