Fixing some compilation warnings about missing generics and varargs invocation