General DAO layer fixes