Revert "Fix NPE"

This reverts commit a0f625def1fbd44069035e97b196e56e93463c0a.