Another try at fixing the NPE