merged back master to jarodwen/hotfix/issue461