fix #869 (#1029)