Reading ATM24C32N page sequentially.

HI,
I am trying to write a page (i2c) sequentially with one of the routines available online. Function is listed below. This function only write 12 bytes at once. Data sheet says it should be able to write upto 32 bytes. Adding delays does not do anything. Splitting the data array into 12 byte pages works fine.
The ram ATM24C32N is on RTC DS3231 module.

Could someone point out why this does not work ? I tried i2c 100k and 400k with similar results.

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB
byte c;
for ( c = 0; c < length; c++)
{ Wire.write(data

); }
  Wire.endTransmission();
}

However if I use writeByte functions, it works fine.

Any help ?

Thanks,
Pubudu