Fixed signed/unsigned comparison warnings. Fortunately not critical.