fix some coercive comparisons and missing semicolons
Merge pull request #710 from wadtech/tidying

fix some coercive comparisons and missing semicolons