Using unsigned long instead of int in parse.i

This caused some overflows and negative ids…