Fixed issues with handling `expect_single_object`