Fix Issue 842: Failing unit tests

Closes #842