Incorrect attempt at fixing NPE