If anyone comes up with the same problem, here is my workaround. You need to create a new model and then copy.deepcopy() the existing model then do the necessary changes you like. It works but I think it is not the genuine solution.