fix crash on startup (nw)