Fix database keys