Fixed test cases due to recent API changes