Fixed bug in store method