Fix handling of unsigned types