502: Replace ternary operator by addition
498: Move assignment to comparison

(There should be more bytes in these ternaries to chop)