fixed unsigned signed comparison warnings