fixes #799

Tested on `3.6-beta4-24560`.