Fix bug with non-short frames

- Mask bytes were double-counted for medium and long messages