fix bug in getData