Error with model summay: ergm()

Hello,

I'm working on Exponential Random Graph Model (ERGM) suing statnet library. Everything was going well either in fitting the model and printing the summary results. However, I tried to edit the ergm summary code to add odds ratios to the ergm summary table by using fix(summary.ergm). A window will open showing the underlying code for the summary function. However, the window does not show any code as shown in the pic so I cancelled it but after that RStudio cannot print the summary of ergm() and keep gives this error:

"Error in summary.ergm(model1) : unused argument (model1)"

I tried every solution I've read: reinstall related library, restart r session, ...etc but nothing worked. The problem occurred after I run this: fix(summary.ergm) and stil occurs.

model1 <- ergm(net1 ~ edges + nodematch("unemployment")+
                  nodematch("poverty17")+
                  nodematch("Non_white17")+
                  nodematch("Red_grade"))
summary(model1)

fix(summary.ergm)

Screen Shot 2020-11-15 at 12.12.26

Do you mean

summary.ergm(model1)

Can you post a reprex?

Does R save your workspace on exit and load it automatically on start ? because that may defeat the purpose of restarting...

I used to use summary(model1) and gives the results, but after fix(summary.ergm) both summary(model1) and summary.ergm(model1) started to give the same error:
Error in summary.ergm(model1) : unused argument (model1)