Fixed read write error.