Fix bug in shifting UByte/UShort + clean up