fix a few -Wsign-compare warnings