Restore functionality broken in pull request #245