redmine #1061 bug fix