fix bugs in the removeDefalta, and options spread mechanism, improve the circular check and make it configrable