minor logic fix
Merge pull request #145 from kargakis/master

minor logic fix