Fix unsigned to signed 16 bits conversion

Thanks to Yoch (https://github.com/yoch)