Fixed condition statement and made it clearer for future devs (added parenthesis where they should have been)