fixed some test cases failure