remove the generic type errors and warnings