Fixed bug in SetReadFlag().