Changed to unsigned types