fix the problem in getData()