fix database save and recall