Change local declaration to explicit assignment

Using the local keyword to declare a variable did
not seem to work on Travis CI. The variable is
now explicitly assigned a 0 value