Change 'int' to 'unsigned int' where appropriate