Fix bug with enum too small

The enum should be within 127, -128 with 8 bits