Fixes a sporadic NPE