Fix ReSharper code inspection errors.