Change some variables from 8-bits to 16-bits for better compatibility with Hero Mesh