fixes some unsigned/signed comparison errors