Adding support for writing to both memories.