Better way of handling the 0xFF trick.