Return an int not a u32 for proper error check.