fix read panic