Manually picked up PR #343