Java API: BTPipe need to be written twice to update FPGA RAM

I am trying to use BTPipes in Java and I am noticing that I have to send the data twice to update the RAM to the latest array value using FrontPanel 4.0.0.

I have a method that takes in a byte] frame and int frameSize and I try to use this command to send the data to the FPGA.

int len = okFPdev.WriteToBlockPipeIn((short)0x80, (short)1024, (short)frameSize, frame);

The function returns len == frameSize every time. I have verified that frame contains the correct data to send.

I have C++ code that does the same operation and it updates the FPGA with only one call to WriteToBlockPipeIn.

Any ideas?