Merge pull request #333 from ovatsus/master

Unit test fixes