Fixed bugs when loading domains from the DB and parsing dates.