Fixed bugs of getListByQuery and getByQuery methods of Dao class.