Fixed some errors in DAO template. refs #500