Fixes and closes issue 17.