fix #1863 fix #1964