Fix rubocop complaint about global variables