Merge test cases

Also fixes #183 , which was not correctly fixed before.