Fix generic related compiler warnings