Fixed some issues from JIRA