fixed some unsigned int issues