Various JIRA bugs fixes