A description of the circuit and/or a picture would be helpful. As well as what RiK asked regarding what it is doing compared to what you expect.
The IN5 = 1 comparison does not need to be in parenthesis. In the manual, parens appear to only be used on an IF-THE-ELSE structure, though not sure if that would trip anything up.