Fixing the re-run code