fix bug in removing model fns