bug fixing for DAO