fix app crash on first start