Fixed a bug where the workspace would not be correctly restored if its value was null at the beginning of the run