Fix #701
(cherry picked from commit 5ad9ddc62585986caaf1d4f269cfa1658a735b5d)