Redmine #1061 fix