Fix DAO and DAOFactory