Fixed C types so that code is more portable