issue #3935 Fix some bugs.

issue #3935 Fix some bugs.