correction for return for enable_write function. It should return the value count and not zero.