fixes the 16bit issue, we still need to improve the performance here