Fixed a couple of bugs in the test cases and bugs the test cases discovered