Fix signed/unsigned comparison

Change-Id: Iedc3b5c20b5f47117f29dcbeaf84efacbd4ce497