possible fix to dom losing functions after model.resetDom()