Revert "fixed a null pointer"

This reverts commit 041922802a4c1bc7a270899fa02dcb7c2353d8ce.