Many fixes in DAL.