Attempt to fix shutdown freeze