Fix some unit tests

This pull request fixes the test failures introduced by #1411