Fixed the device lost caused by 32-bit indices by switching to 16-bit