Removes an unnecessary method invocation.
Fixes warnings.