Fix read and write support