fix datap reading