fix bug when store is empty