tweaks for gcc. swaped index size_t types for uint32_t