modified the condition for redmine issue #2684