Adapt code to new rubocop version