fixes database and map