Fixes bug in #20: Double application of function
Merge pull request #22 from HageMaster3108/master

Fixes bug in #20: Double application of function