fixed crash at startup