Add const.
Fix conditions.