Fixed NPE happing with the check first time launch code