zhjj add for stack 10.21 fix some bug