Support more than 254 regions

This fixes issue #2 I entered earlier.