Fix failng tests. Closes  #27  from RI and pull request 30 from RI