fixed shutdown methods not being called