Avoid use of undefined variable before being used.
Merge pull request #5 from ehelms/avoid-undef

Avoid use of undefined variable before being used.