Fix issue with db mapping