update rubocop and fix some errors