fixed pop bug when no data is in datastore