Fix invalid read.