unsigned to int comparison fix