Fixed the loadDataFromDB bug