fix #102 - oops...operator precedence! apply variation of @morgen32's PR