Revert "fix npe"

This reverts commit 7ac253f6ed08d66f1a0b0c9d4c9cce85f236a614.