Fix redmine #2936