Fixex issues described in ticket '17'. Closes issue #17