Fix bug of getting data