fix signedness errors