Unbreaking the build
Closes #148 with the test cases

The problem was fixed in commit e3599397 which closed #150.