fix corrupt variable call
Merge pull request #218 from senny/fix-function

fix corrupt variable call