Fix shutdown.
SPOI-3304 #comment changes to adhere to API