fix #939 (#940)