Reverted change that caused a NPE