Fix for db not being able to save