fix an issue with Map based databases never storing elements in the database (ooops!)