discovery: fix stage 1 data read/write