Fixing database storer and its tests