Reverse order to prevent null pointer
Merge pull request #699 from caskdata/hotfix/shell-nullpointer

Reverse order to prevent null pointer