Fixing database storage