fix occasional startup crash