fix bug in all data query