correct bug in data retriving