Corrects checking to fix #356.
Merge pull request #357 from LearningLocker/issue-356

Corrects checking to fix #356.