Fixed the tests case_7 and case_8