fixes database