Fixed NPE for build issue