Fixed an issue that would cause the workflow to crash the first few times it was run