Fix shutdown issue
Update for library changes