fix remove handler to also delete references to existing models