Fix bugs in store