Fix usage of raw type instead of generic ones.