fix bug in read.cpp, class compiled