fixed undefined variable errors
Merge pull request #500 from 3scale/patch-2

Fixed undefined variable error