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

Corrects checking to fix #356.
Merge pull request #358 from LearningLocker/develop

Fix for #356.