Merge pull request #1 from vamatya/master

compilation error fix
Merge pull request #2 from vamatya/master

bugfix, correct parameter for function