Consolidated pull request for issue #3405