fix some bug in getData method. #6