These changes 0xffff to 0xff likely have side effects relating to the slot conversion.

You can use -1 instead if 0xffff is causing a warning.