Fixed insertion error and added another test case