fix 'unexpected operator' warnings