Fixed the `getData` method