Temporarily fix crash on shutdown