fix NPE on build running making build failed