fixes for M3. Mostly byte buffer changes