fixing some misbehavior in error checking
Merge pull request #56 from reneme/test_bugfix

Bugfix: Error checking in test cases did not behave as expected