JIRA EV-9: Fixed a bug and tested.