Removed few bugs in DAL