Implement getText properly