Merge pull request #141 from moranjk/develop

fixed malformed if statement

Thanks, James.