fixing JIRA bug 839