Fix return value of toggle function
Merge pull request #8 from mhluska/master

Toggle function returns incorrect value