Tentative fix to the uint16_t cast warning