Fix crash at startup