Fixes #3784 Fixing API, but ideally would need tests
Merge remote-tracking branch 'origin/master'