avoid possible sign-compare issues