fix class cast logic for twitter4j, cs