#318: 'helper.py', adjust logic typos

Resolves #318.