fixed the read problem