Attempt to fix the crash at shutdown in Linux.