fix #1845 (#1851)