fixed implementation of model redefinition