Merge pull request #50 from lategoodbye/master

Fixed correction in auxiliary function