fix npe when starting shell