- backport #3093 to 0.8, fixes #3093