Update test cases for support fragments; fix bugs