Try using stateless _shutdown function rather than method.