add workaround for NPE, the quesition is why this even happens!