Fixed the check to more closely follow issue #12