fix read call handling